<include file="./Tm/Dt/Top.html" />

<include file="./Tm/Dt/Left.html" />

<!--页面右侧内容块-->
<!--顶部信息栏-->
<div id="right">
    <include file="./Tm/Dt/Nav.html" />
    <!--主要内容块-->
    <div class="main"> <form id="form" name="form" method="post" action="/user/docartorder">
        <div class="panel panel-primary">
            <div class="panel-body panel-heading">
                <h3 class="panel-title">购物车</h3>
            </div>
            <div class="panel-footer clearfix gwcbig-box">

		            <if condition="count($room) eq 0"><div class="kong">
		                购物车空空如也<button type="button" class="btn btn-primary btn-sm" onclick="product();">我要购物</button>
                    </div>
		            <else/>

                <div class="container-fluid">

                    <volist name="room" id="vo" key="i">
                    <div class="row gwcbox">
                        <div class="col-md-6 col-xs-12 gwcxq">
                            <div>
                                <p><input type="checkbox" id="id{$vo.id}" name="id[]" value="{$vo.id}" onclick="ChooseProduct(this,'{$vo.id}');" class="allid"></p>

                            </div>
                            <div class="gwcimg"><img src="__PUBLIC__/Dt/image/spimg.png"/></div>

                        </div>
                        <div class="col-md-6 col-xs-12">
                            <ul class="gwccz">
                                <li>产品名称：{$vo.productname}</li>
                                <li>价格： <span id="price{$vo.id}"><?php echo(sprintf("%.2f", $vo['price'])); ?></span></li>
                                <li>数量：   <font size="4" color="black" onclick="SetNumberdec('{$vo.id}');" style="cursor:pointer">-</font> <input id="number{$vo.id}" name="number{$vo.id}" value="{$vo.number}" style="width:30px" readonly> <font size="4" color="black" onclick="SetNumberinc('{$vo.id}');" style="cursor:pointer">+</font></li>
                                <li>总价： <input type="text" id="total{$vo.id}" name="total{$vo.id}" readonly value="<?php echo(sprintf("%.2f", $vo['price'] * $vo['number'])); ?>" ></li>
                                <li></li>
                                <li></li>
                                <li></li>
                            </ul>
                        </div>
                        <a href="javascript:void();" onclick="DeleteCart('{$vo.id}');"><button type="button" class="close"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button></a>
                    </div>
                    <div style="height: 20px;"></div>
                   </volist>
                    <table class="table">
                        <tr>

                            <th>商品价格合计： <input type="text" id="totalprice" name="totalprice" value="0.00" class="sita" readonly></th>
                            <th></th>
                        </tr>
                        <tr>

                            <td>联系人： <input type="text" id="realname" name="realname" value="{$user.realname}"></td>
                            <td></td>
                        </tr>
                        <tr>

                            <td>手　机： <input type="text" id="mobile" name="mobile" value="{$user.mobile}"></td>
                            <td></td>
                        </tr>
                        <tr>

                            <td>地　址： <input type="text" id="address" name="address" value="{$user.address}"></td>
                            <td></td>
                        </tr>
                        <tr>

                            <td>支付方式：<label> <input type="radio" name="pay" value="1" checked > 消费帐户({$int.integral5})</label> </td>
                            <td></td>
                        </tr>
                        <tr>

                            <td>
                                <input type="submit" id="submit" class="btn btn-primary btn-sm" value="提交订单" onclick="return Check();">
                            </td>
                            <td><button type="button" class="btn btn-primary btn-sm" onclick="product();">继续购物</button> <button type="button" class="btn btn-warning btn-sm" onclick="DeleteAllCart()">清空购物车</button></td>
                        </tr>
                    </table>
                </div>
                </if>
            </div>

        </div>
        </form>
    </div>


</div>
<include file="./Tm/Dt/Foot.html" />
<script src="__PUBLIC__/Dt/Home/user_cart.js" type="text/javascript" charset="utf-8"></script>